<!DOCTYPE html>
<html lang="en">
<head>
	<meta charset="UTF-8">
	<title>Document</title>
</head>
<body>

	<ul id = "food">
		
		<li>面包</li>
		<li>馒头</li>
		<li>玉米</li>
	</ul>
	
</body>

	<script>
		
		var btn = document.getElementById("food");

		var b = btn.childNodes;

		// console.log(b);

		for(var i = 0;i<b.length;i++){
			
			// 通过nodetpe筛选
			if(b[i].nodeType == 1){
				console.log(b[i]);
			}
		}

		// console.log(btn);

	</script>
</html>